<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="cutDetailList.title"/></title>
    <meta name="heading" content="<fmt:message key='formProcessDressMaker.heading'/>"/>
    <meta name="menu" content="RoleAdminCut"/>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/calendar.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/lang/calendar-es.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/calendar-setup.js'/>"></script>
     <script type="text/javascript">
        window.onload = function() {
            Calendar.setup({
                inputField: "processDressmaker.endDate",
                ifFormat: "%d/%m/%Y",
                button: "endDate"
            });
        }

    </script>
</head>
<div id="help">
    <h2>
        <a href="<c:url value='helpFormProcessDressMakerReview.html?decorate=false'/>"
           title="Help material purchase"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
               <fmt:message key="help"/>
        </a>
    </h2>
</div>
<s:form id="processDressMakerForm" action="saveProcessDressMaker" method="post" validate="true">
    <fieldset>
     <legend><fmt:message key="cutProcessForm.selectDatas"/></legend>

        <s:hidden name="processDressmaker.id" value="%{processDressmaker.id}"/>
        <table class="tableGrey" id="SelectedDatas">
            <thead>
                <tr>
                    <th class="hidden"/>
                    <th><fmt:message key="processDressmaker.employee.fullName"/></th>
                    <th><fmt:message key="processDressmaker.initDate"/></th>
                    <th><fmt:message key="processDressmaker.endDate"/></th>
                    <th><fmt:message key="processDressmaker.totalAmountFail"/></th>
                    <th><fmt:message key="processDressmaker.totalAmount"/></th>
                    <th><fmt:message key="processDressmaker.totalCurrentAmount"/></th>
                    <th class="hidden"/>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td> <s:property value="processDressmaker.employee.fullName" /> </td>
                    <td> <s:property value="processDressmaker.initDate" /> </td>
                    <td> <s:textfield id="processDressmaker.endDate" key="endDateProcessDressmaker" required="true" size="9"/></td>
                    <td> <s:property value="processDressmaker.totalAmountFail"/></td>
                    <td> <s:property value="processDressmaker.totalAmount"/></td>
                    <td> <s:property value="processDressmaker.totalCurrentAmount"/></td>
                </tr>
            </tbody>
        </table>

        <c:set var="buttons">
            <s:submit cssClass="button" method="saveProcessDressmakerReview" key="button.save" theme="simple"/>
            <s:submit cssClass="button" method="cancelProcessDressmakerReview" key="button.cancel" theme="simple"/>
            <input type="button" onclick="location.href='<c:url value="/genJasRepProcessDressMakerReview.html"/>'"
                   value="<fmt:message key="button.reportPDF"/>"/>
        </c:set>
    <c:out value="${buttons}" escapeXml="false" />
    </fieldset>
</s:form>

<fieldset>
     <legend><fmt:message key="addDressMakerForm.itemsAsigned"/></legend>
<display:table name="pantDetailList" class="table" requestURI="" id="pantDetailList_1" export="false" list="pantDetailList_1"
               pagesize="25">

    <display:column sortable="false" titleKey="formProcessDressMaker.editPantDetail" style="width: 5%"
                    autolink="true" media="html" href="editPantDetailReview.html" paramId="id" paramProperty="id">
                <img src="<c:url value="/images/edit.png" />" alt="Edit" />
    </display:column>
    <%--display:column sortable="false" titleKey="formProcessDressMaker.addTradeMarkPantDetail" style="width: 5%"
                    autolink="true" media="html" href="asignTrademarkToDressMaker.html" paramId="id" paramProperty="id">
            <img src="<c:url value="/images/trademarkWrangler.gif" />" alt="Edit" />
    </display:column--%>

    <%--display:column property="onStock" sortable="true" titleKey="formProcessDressMaker.stock"/--%>
    <display:column property="storageCut.pantDesign.datas" sortable="true" titleKey="storageCut.pantDesign.datas"/>
    <display:column property="quantity" sortable="true" titleKey="formProcessDressMaker.quantity"/>
    <display:column property="priceXclothes" sortable="true" titleKey="formProcessDressMaker.priceXclothes"/>
    <%--display:column property="quantityFail" sortable="true" titleKey="formProcessDressMaker.quantityFail"/>
    <display:column property="priceXclotheFail" sortable="true" titleKey="formProcessDressMaker.priceXquantityFail"/--%>
    <%--display:column property="totalAmountClothes" sortable="true" titleKey="formProcessDressMaker.totalAmountClothes"/--%>
    <display:column property="quantityFail" sortable="true" titleKey="formProcessDressMaker.quantityFail"/>
    <display:column property="priceXclotheFail" sortable="true" titleKey="formProcessDressMaker.priceXquantityFail"/>
    <display:column property="totalAmount" sortable="true" titleKey="formProcessDressMaker.totalAmount"/>
    <%--display:column property="currentAmount" sortable="true" titleKey="formProcessDressMaker.currentAmount"/--%>

    <display:column property="quantityRealClothes" sortable="true" titleKey="formProcessDressMaker.quantityRealClothes"/>
    <%--display:column property="quantityRealClothesCurrent" sortable="true" titleKey="formProcessDressMaker.quantityRealClothesCurrent"/--%>
    <display:column property="distribution" sortable="true" titleKey="formProcessDressMaker.distribution"/>

    <display:setProperty name="paging.banner.item_name" value="cut process"/>
    <display:setProperty name="paging.banner.items_name" value="cut processes"/>

    <display:setProperty name="export.excel.filename" value="CutProcess List.xls"/>
    <display:setProperty name="export.csv.filename" value="CutProcess List.csv"/>
    <display:setProperty name="export.pdf.filename" value="CutProcess List.pdf"/>

</display:table>
                
</fieldset>
   <div id="divMaterialUsed">

        <fieldset>

         <legend><fmt:message key="cutProcessForm.addMaterials"/></legend>
         <br/>
         <input type="button" style="margin-right: 5px"
                onclick="location.href='<c:url value="/addMaterialUsedDressMaker.html"/>'"
                value="<fmt:message key="button.add"/>"/>
         <br/>
         <br/>

           <display:table name="listProcessDressmakerPurchaseDetail" cellspacing="0" cellpadding="0" requestURI=""
                          defaultsort="1" id="listPurchaseDetailCutProcess" pagesize="25" class="table" >

            <display:column sortable="false" titleKey="cutProcessForm.editMaterial.editMaterialUsed" style="width: 10%"
                            autolink="true" media="html" href="editMaterialUsedProcessDressmaker.html" paramId="id" paramProperty="id">
                    <img src="<c:url value="/images/edit.png" />" alt="Edit" />
            </display:column>

            <display:column property="purchaseDetail.material.name" sortable="true" titleKey="purchaseDetail.material.name" style="width: 10%" autolink="true" media="html"/>
            <display:column property="quantity" sortable="true" titleKey="asignationCut.quantity" style="width: 25%" autolink="true" media="html"/>
            <display:column property="quantityFail" sortable="true" titleKey="cutDetail.quantityFail" style="width: 10%" autolink="true" media="html"/>
            <display:column property="priceQuantityFail" sortable="true" titleKey="priceQuantityFail" style="width: 10%" autolink="true" media="html"/>
            <display:column property="totalAmountQuantityFail" sortable="true" titleKey="totalAmountQuantityFail" style="width: 10%" autolink="true" media="html"/>

            <display:column sortable="false" titleKey="cutProcessForm.deleteMaterial.deleteMaterialUsed" style="width: 10%"
                            autolink="true" media="html" href="deleteMaterialUsedProcessDressmaker.html" paramId="id" paramProperty="id">
                    <img src="<c:url value="/images/trash.png" />" alt="Delete" />
            </display:column>

            <display:setProperty name="paging.banner.all_items_found" value=""/>
            <display:setProperty name="paging.banner.some_items_found" value=""/>
            <display:setProperty name="paging.banner.one_item_found" value=""/>
            <display:setProperty name="paging.banner.no_items_found" value=""/>

        </display:table>

        </fielset>
    </div>
